<html>
<head>
<style>
html, body, .container{
    height: 100%;
}
.container{

}
.center{
    width: 100px;
    height: 100px;
    background-color: black;
    position: relative;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
}
</style>
</head>
<body>
    <div class="container">
        <div class="center"></div>
    </div>
</body>
</html>